package cc.linker.steplink.crm.merchanth5.dao;

import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface MallBoomDao {

    Map<String,Object> getCustomerInfoByCustomerId(String customerId);

    Integer getJoinMoney(String orgId);

    Integer getJoinMoneyPromoter(String orgId);

    Integer getJoinRebate(String orgId);

    HashMap<String, Object> getSalerOrder(Map map);

    HashMap<String, Object> getSalerOrderBySn(String orderSn);

    HashMap<String, Object> getJoinStatus(Map map);

    Integer getSalerCount(Map map);

    Integer getPromoterCount(Map map);

    Integer getAgentCount(Map map);

    Integer addSalerOrder(Map map);

    Integer addSaler(Map map);

    Integer doneSalerOrder(Map map);

    Integer editSalerOrder(Map map);

    Integer updateSalerInfo(Map<String, String> params);

    Integer savePromoter(String customerId);

    HashMap<String, Object> getMyBoom(@Param(value = "customerId") String customerId);

    Integer addAccountTrade(Map map);

//    Integer saveBusinessImg(Map map);

    List<Map<String, String>> getSonBoomList(String pcustomerId);

    HashMap<String, String> getSalerAccount(String customerId);

    List<Map<String, Object>> getAllMallBoomGoods(Map map);
//    List<Map<String,Object>> getAllMallBoomGoods(String orgId);

    String getUserIdBySalerId(String customerId);

    Integer mobileCount(@Param("phone") String phone, @Param("orgId") String orgId);

    Integer getGoodsCount(Map map);

    Long getSkuMoneyByGoodsId(String goodsId);

    Integer getJoinRebateRf(String orgId);

    Map<String, Integer> getReverseProfitModel(String orgId);

    String findPid(String cid);

    int isSalerByCid(String cid);

    List<Map<String,String>>getShareUserList(Map map);

    Long getUserContributionMoney(Map map);

    Long getUserContributionMoneyZj(Map map);

    String getBelongIdByGoodsId(Long goodsId);

    List<Map<String,Object>> getGoodsInfoByGoodsIds(@Param("goodsIds") List<String> goodsIds);

    void addRebateTrade(Map map);

    Integer getRebateTradeSum(Map<String, Object> tradeParam);

    void cleanRebateTradeSum(Map<String, Object> tradeParam);

    void addTrack(Map<String, Object> map);

    String getGoodsNameById(Long goodsId);

    String getUserPushArticleIds(String orgId);

    void updateSalerLabelAndRemark(Map<String, Object> map);

    String getTokenByCustomerId(String pCustomerId);

    String getCustomerByPrimaryKey(String customerId);

    String getCustomerPhone(String customerId);

    String checkSalerPhone(String customerId);

    void saveCustomerPhone(@Param("customerId") String customerId, @Param("phone") String phone);


    Map<String,String> getOrgAccountConf(@Param("orgId") String orgId, @Param("status") String status);

    void addOrgAccountConf(@Param("orgId") String orgId, @Param("status") String status);

    boolean saveOrgAccountConf(Map param);

    List<Map<String, String>> getAllOrgConf();

    void setOrgAccountConf(Map param);

    boolean cancelOrgAccountConf(String orgId);

    void openAccount(Map<String, Object> map);

    String findCustomerName(String customerId);

    Map<String,String> getOrgCutByOrgId(String orgId);

    String getCustomerIdByEaccount(String eaccount);

    Map<String,Object> getSalerOrderBysn(String orderSn);

    /**
     * 根据机构id查机构的支付模式
     * @param params
     * @return
     */
    Integer getPayModeByOrgId(Map<String, Object> params);

    void delivery(Map<String, Object> params);

    Integer getNotDeliveryCount(Map<String, Object> map);

    void updateOrderStatus(Map<String, Object> map);

    Map<String, Object> getMsgInfo(Map<String, Object> params);

    Map getOrderInfoById(@Param(value = "orderId") Long orderId,@Param(value = "payMode") Integer payMode);

    void updateBindPhoneByCid(Map<String,Object> params);

    String getBindPhoneByCid(String customerId);

    void saveCustomerParent(Map param);

    String getGoodsBelongIdByGoodsId(Integer goodsId);

    String getPNameByCustomerId(String customerId);

    void resavePromoter(String customerId);

    String getAgentCountStatus(@Param(value = "customerId") String customerId);

    Map<String, Object> getPromoterInfo(Map<String, String> tmpParam);

    Integer getSalerPromoter(Map<String, String> tmpParam);

    Integer getStreamByCustomerId(String customerId);

    void setInit(Map<String, Object> param);

    int getCustomerParentCount(Map<String, Object> ret);
}
